﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Wilson/MP/Base.Master" AutoEventWireup="true" CodeBehind="AdList.aspx.cs" Inherits="WebsiteAdmin.Wilson.AdInfo.AdList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head_Title" runat="server">广告列表 - 广告</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Head_Meta" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Head_Css" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Head_Script" runat="server">
    <script type="text/javascript" language="javascript">
        var MenuViewID = 3;
        function Del(e, t) {
            if (confirm('确定删除 “' + t + '”？')) {
                //LightBox.show();
                new Request.JSON({
                    method: 'post',
                    url: 'Handler/Delete.ashx',
                    data: {
                        PKID: e
                    },
                    noCache: true,
                    onSuccess: function(data, text) {
                        if (data.Done == 'Success') {
                            alert('删除成功');
                            document.location.reload();
                        } else {
                            alert('删除失败');
                        }
                        //LightBox.remove();
                    },
                    onFailure: function(xhr) {
                        alert(xhr.statusText);
                        //LightBox.remove();
                    }
                }).send();
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Body_Top" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Body_Content" runat="server">
    <div class="infobox">
    <h3>
        <span>分类广告管理</span>
        <a href="/Wilson/AdInfo/AdCreate.aspx" class="back action">新建</a>
    </h3>
    <div class="pd05">
        <table border="0" cellpadding="0" cellspacing="1" id="tablegrid" class="tb">
		    <thead>
		    <tr>
		        <th width="40">&nbsp;</th>
			    <th width="120">分类名称</th>
			    <th>标题名称</th>
			    <th width="200">日期</th>
			    <th width="40">&nbsp;</th>
			    <th width="40">&nbsp;</th>
		    </tr>
		    </thead>
		    <tbody>
		    <asp:Repeater ID="repCatAdList" runat="server" EnableViewState="false">
		    <ItemTemplate>
		        <tr>
		            <td><%#Eval("RowId") %></td>
		            <td><%#Eval("CatName") %></td>
		            <td><%#Eval("AdTitle") %></td>
		            <td><%#Eval("StartDate","{0:d}") %>~<%#Eval("EndDate", "{0:d}")%></td>
		            <td><a href="/Wilson/AdInfo/AdEdit.aspx?pkid=<%#Eval("PKID") %>">修改</a></td>
		            <td><a href="javascript:Del('<%#Eval("PKID") %>','<%#Eval("AdTitle") %>');">删除</span></a></td>
		        </tr>
		    </ItemTemplate>
		    </asp:Repeater>
		    </tbody>
        </table>
    </div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Body_Foot" runat="server">
</asp:Content>
